{% extends "wltheme/ucenter/ucenter_base.html" %}
{% load wenlincms_tags wlcore_tags %}

{% block breadcrumb_menu_more %}
    <li><a href="/uc/my_follow" class="am-active">账户设置</a></li>
{% endblock %}

{% block main_nav %}
    <ul class="main_nav am-nav am-nav-pills" id="main_nav">
        <li>
            <a href="{% url "profile_update" %}" class="active">基本信息</a>
        </li>
        <li>
            <a href="/uc/user_org">机构信息</a>
        </li>
        <li>
            <a href="{% url "wenlincms_password_reset" %}">修改密码</a>
        </li>
        <li class="nav-right">
            <div class="am-form-group">
                <input type="text" class="am-form-field am-input-sm" placeholder="搜索好友"/>
                <a href="#" id="smbutton"><span class="am-icon-search smicon"></span></a>
            </div>
        </li>
    </ul>
{% endblock %}

{% block main_content %}
    <div class="">
        <form method="post" class=" am-form am-form-horizontal" enctype="multipart/form-data" name="career_profile">
            {{ career_profile_form.errors }}
            {% csrf_token %}
            <div class="am-form-group">
                <label for="{{ user_form.username.id_for_label }}" class="am-u-sm-3 am-form-label">用户名:</label>

                <div class="am-u-sm-4 am-u-end">
                    {{ user_form.username }}
                </div>
            </div>
            <!-- end username -->
            <div class="am-form-group">
                <label for="{{ career_profile_form.gender.id_for_label }}" class="am-u-sm-3 am-form-label">性别:</label>

                <div class="am-u-sm-4 am-u-end">
                    {{ career_profile_form.gender }}
                </div>
            </div>
            <!-- end title -->
            <div class="am-form-group">
                <label for="{{ career_profile_form.title.id_for_label }}" class="am-u-sm-3 am-form-label">真实姓名:</label>

                <div class="am-u-sm-4 am-u-end">
                    {{ career_profile_form.title }}
                </div>
            </div>
            <!-- end title -->
            <div class="am-form-group">
                <label for="{{ user_form.email.id_for_label }}" class="am-u-sm-3 am-form-label">邮箱:</label>

                <div class="am-u-sm-4">
                    {{ user_form.email }}
                </div>
                <div>
                    {{ user_form.email.errors }}
                </div>
            </div>
            <!-- end email -->
            <div class="am-form-group">
                <label for="{{ career_profile_form.unit_title.id_for_label }}"
                       class="am-u-sm-3 am-form-label">公司:</label>

                <div class="am-u-sm-4">
                    {{ career_profile_form.unit_title }}
                </div>
                <div>
                    {{ career_profile_form.unit_title.errors }}
                </div>
            </div>
            <!-- end company -->
            <div class="am-form-group">
                <label for="{{ career_profile_form.duty.id_for_label }}" class="am-u-sm-3 am-form-label">职位:</label>

                <div class="am-u-sm-4">
                    {{ career_profile_form.duty }}
                </div>
                <div>
                    {{ career_profile_form.duty.errors }}
                </div>
            </div>
            <!-- end duty -->
            <div class="am-form-group">
                <label for="{{ career_profile_form.phone.id_for_label }}" class="am-u-sm-3 am-form-label">电话:</label>

                <div class="am-u-sm-4">
                    {{ career_profile_form.phone }}
                </div>
                <div>
                    {{ career_profile_form.phone.errors }}
                </div>
            </div>
            <!-- end telephone -->
            {#            <div class="am-form-group">#}
            {#                <label for="{{ career_profile_form.avatar.id_for_label }}" class="am-u-sm-3 am-form-label">上传用户头像:</label>#}
            {#                <div class="am-u-sm-4">#}
            {#                    <input type="text" name="predent" id="puf" />#}
            {#                </div>#}
            {#                <input type="button" value="浏览" onclick="mc()"  class="am-btn"/>#}
            {#                <input type="file" name="avatar" id="id_avatar" style="display:none" onchange="mm()" />#}
            {#                <div >#}
            {#                    {{ career_profile_form.avatar.errors }}#}
            {#                </div>#}
            {#            </div><!-- end avatar -->#}
            <div class="am-u-sm-4 am-u-sm-centered">
                <input class="am-btn  am-btn-primary am-u-sm-8 " type="submit" value="{{ title }}">
            </div>
        </form>
    </div>
{% endblock %}

{% block js %}
    <script>
        $ = function (id) {
            return document.getElementById(id);
        };
        function mc() {
            var _i = $("id_avatar");
            _i.click();
        }
        function mm() {
            $("puf").value = (document.career_profile.avatar.value);
        }
        window.onload = function () {
        }
    </script>
{% endblock %}
